
package com.be.beadmin.quality.service;

import com.be.beadmin.common.entity.PageEntity;
import com.be.beadmin.quality.dto.input.InspectionTemplateDto;
import com.be.beadmin.quality.dto.input.InspectionTotal;
import com.be.beadmin.quality.dto.output.InspectionTemplateEx;
import com.be.beadmin.quality.entity.InspectionTemplate;
import org.springframework.data.domain.Page;

import java.util.Date;
import java.util.List;

/**
* @description 服务接口
* @author ljh
* @date 2023-05-18
**/
public interface InspectionTemplateService {

    /**
    * 分页的查询接口
    * @param pageEntity
    * @return
    */
    Page<InspectionTemplateEx> getInspectionTemplateByPage(PageEntity pageEntity);

    /**
    * @param inspectionTemplateDto
    */
    void addInspectionTemplate(InspectionTemplateDto inspectionTemplateDto);

    /**
    * @param inspectionTemplateDto
    */
    void updateInspectionTemplate(InspectionTemplateDto inspectionTemplateDto);

    /**
    * @param id
    */
    void delInspectionTemplate(String id);

    /**
    * 删除多个角色
    * @param ids
    */
    void delInspectionTemplates (List<String> ids);

    List<String> getInspectionType();

    void publishInspectionTemplate(String inspectionTemplateId, Date publishTime);



    InspectionTemplate getInspectionTemplateByNameAndProductType(String name, String productType);

    InspectionTotal getInspectionTemplateByProductTypeAndType(String type, String productType);

    InspectionTotal getInspectionTemplateByProductTypeAndTypeAndName(String type, String productType, String name);

    /**
     * 根据id获取检验表模板
     * @param inspectionTemplateId
     * @return
     */
    InspectionTemplate getInspectionTemplateById(String inspectionTemplateId);


    InspectionTemplate checkInspectionTemplateByProductAndProcess(String productType, String processName);
}